<?php use_helper('jQuery')?>
<script type="text/javascript">
    $(function() {
        $("input:submit").button();
    })
</script>

<?php echo jq_form_remote_tag(
        array(
            'update' => 'main-content',
            'url' => url_for('nominaciones_create_candidate', $category),
            'before' => 'showLoader();',
            'complete' => 'hideLoader();',
            'script' => true
        ), array(
            'id' => 'candidate-form',
            'class' => ''
        )); ?>
<?php if (!$form->getObject()->isNew()): ?>
    <input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
    <div class="span-17 last">
        <?php echo $form ?>
        <div class="prepend-top prepend-7 span-10 last">
            <input type="submit" value="Nominar" />
        </div>
        <div id="backtocategories" class="prepend-top span-17 last">
            <?php echo jq_link_to_remote('Volver a Categorias', 
                array(
                    'url' => url_for('nominaciones_categories'),
                    'update' => 'main-content',
                    'before' => 'showLoader();',
                    'complete' => 'hideLoader();',
                    'script' => true
                ), array(
                    'class' => 'backtocategories'
                ));
            ?>
        </div>
    </div>
</form>
